Skip to content

Conversation

@LucaCappelletti94
Copy link
Contributor

Parsing SET AUTHORIZATION <value> without a scope modifier (e.g. SESSION, LOCAL) causes a panic due to an .expect() call on a None value in parse_set. This was discovered via a fuzz-like input string but is trivially reproducible with any SET AUTHORIZATION ... statement that omits the scope keyword.

The panic occurs at mod.rs:

scope: scope.expect("SET ... AUTHORIZATION must have a scope"),

Valid SQL requires a scope modifier, e.g. SET SESSION AUTHORIZATION 'user', so the missing scope is indeed an error — but it should be a graceful ParserError, not a panic.

Closes #2200

@LucaCappelletti94 LucaCappelletti94 marked this pull request as ready for review February 6, 2026 08:58
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @LucaCappelletti94!

@iffyio iffyio added this pull request to the merge queue Feb 10, 2026
Merged via the queue into apache:main with commit 03f00cd Feb 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reachable expect panic

2 participants